﻿using GraphProcessor;
using IQIGame.Onigao.Logic;
using LFloatMath.Math;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(SkillEditorConst.Target + "/" + SkillEditorConst.RandomUnit, typeof(SkillEditorGraph))]
    public class SkillTargetSelectNode_RandomUnit : SkillTargetSelectNode
    {
        [InspectorName("次数")] public int num;
        [InspectorName("是否可重复")]public bool repeat;
        
        protected override bool checkRelation => true;
        
        protected override ETargetSelectType targetType => ETargetSelectType.RandomUnit;

        protected override SkillCustomConfig CreateConfig()
        {
            return new TargetSelect_RandomUnit_ConfigData()
            {
                num = this.num,
                repeat = this.repeat,
            };
        }
    }
}